{include h}
{include index_header}
<!--{hook t_m_search_index_1}-->
<section class="body" id="index_body">
<div style="padding-bottom: 5px;position: relative;">
<!--{hook t_m_search_index_2}-->

<!--{hook t_m_search_index_3}-->
  <div style="height:36px"></div>
  <div class="rebtn bor active" style="margin-left: 15px;left: 0;">
    <form action="{#WWW}search" method="get">
    <input type="text" name="key" value="{$search_key}">
    </form>
    <button class="icon-search"></button>
  </div>
<!--{hook t_m_search_index_4}-->
  {if empty($data)}
    
    <p style="    margin: 17px;
    padding: 47px 10px;
    text-align: center;
    background: #e7edf3;
    color: #667d99;
    font: 16px/1.8 Microsoft YaHei, Helvetica, sans-serif;
    border-radius: 4px;">{$_LANG['找不到']} "{$search_key}" {$_LANG['内容']}</p>
    
  {/if}
	<list id="forum-list">
	{foreach $data as $v}
	<!--{hook t_m_search_index_5}-->
	{include thread_list}
	<!--{hook t_m_search_index_6}-->
	{/foreach}
	</list>
  <!--{hook t_m_search_index_7}-->
<div class="hy-box hy-bo-t" style="padding:10px;text-align: center;">
    <a href="{if $pageid==1}javascript:void(0);{else}{php echo WWW.URL('search',$pageid-1);}?key={$search_key}{/if}" class="hy-btn hy-btn-blu1 l {if $pageid==1}disabled{/if}">{$_LANG['上一页']}</a>
    
    <a href="{if count($data)!=$conf['searchlist']}javascript:void(0);{else}{php echo WWW.URL('search',$pageid+1);}?key={$search_key}{/if}" class="hy-btn hy-btn-blu1 r {if count($data)!=$conf['searchlist']}disabled{/if}">{$_LANG['下一页']}</a>
    <div style="clear: both;"></div>
  </div>

  <!--{hook t_m_search_index_8}-->
</div>
<script type="text/javascript">

  //   var href='{#WWW}search{#EXP}'+(search_page++)+'?key={$search_key}';
  //   window.history.pushState("","",href);

  //   $.ajax({
  //     url:href,
  //     dataType:'html',
  //     success:function(e){
  //       window.is_loading=false;
  //       $("#forum-list").append('<div class="hy-box page-hr"><div class="page-hr1">第 '+(window.search_page-1)+' 页</div><div class="page-hr1"></div></div>');
  //       $("#forum-list").append(e.match(/<list id="forum-list">([\s\S]*?)<\/list>/)[1]);
        

  //       $("#forum-body-bottom").removeClass("loading");
  //       $("#forum-body-bottom .icon-undo2").removeClass("fa-spin1").next().text('向上拉继续加载');
  //       index_body.refresh();
        
  //     }
  //   })


		
		// window.history.pushState("","",'{#WWW}search?key={$search_key}');
  //   window.search_page=2;

		// $("#forum-body-top .icon-undo2").addClass("fa-spin1").next().text('数据加载中...');
		// index_body.refresh();
  //   $.ajax({
  //     url:'{#WWW}search?key={$search_key}',
  //     dataType:'html',
  //     success:function(e){
  //       window.is_loading=false;
  //       $("#forum-body-top").removeClass("loading");
  //       $("#forum-body-top .icon-undo2").removeClass("fa-spin1").next().text('下拉刷新内容');
  //       $("#forum-list").html(e.match(/<list id="forum-list">([\s\S]*?)<\/list>/)[1]);
  //       index_body.refresh();
        
  //     }
  //   })

</script>
</section>
{include b_menu}
{include f}